From: Ewan Mellor Date: Thu, 28 Dec 2006 16:52:44 +0000 (+0000) Subject: Remove a few more explicit type conversions, now that stringify is fixed. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~127 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=396b267ecd862ba548f6c877b257920e77bfa8be;p=xen.git Remove a few more explicit type conversions, now that stringify is fixed. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendPIF.py b/tools/python/xen/xend/XendPIF.py index aea03e0b16..b6f2345c36 100644 --- a/tools/python/xen/xend/XendPIF.py +++ b/tools/python/xen/xend/XendPIF.py @@ -123,13 +123,13 @@ class XendPIF: def get_record(self, transient = True): result = {'name': self.name, 'MAC': self.mac, - 'MTU': str(self.mtu), + 'MTU': self.mtu, 'VLAN': self.vlan, 'host': self.host.uuid, 'network': self.network.uuid} if transient: - result['io_read_kbs'] = str(self.get_io_read_kbs()) - result['io_write_kbs'] = str(self.get_io_write_kbs()) + result['io_read_kbs'] = self.get_io_read_kbs() + result['io_write_kbs'] = self.get_io_write_kbs() return result diff --git a/tools/python/xen/xend/XendStorageRepository.py b/tools/python/xen/xend/XendStorageRepository.py index 3ab5480a81..fd3a5980cd 100644 --- a/tools/python/xen/xend/XendStorageRepository.py +++ b/tools/python/xen/xend/XendStorageRepository.py @@ -103,16 +103,16 @@ class XendStorageRepository: retval = {'uuid': self.uuid, 'name_label': self.name_label, 'name_description': self.name_description, - 'virtual_allocation': str(self.storage_alloc), - 'physical_utilisation': str(self.storage_used), - 'physical_size': str(self.storage_max), + 'virtual_allocation': self.storage_alloc, + 'physical_utilisation': self.storage_used, + 'physical_size': self.storage_max, 'type': self.type, 'location': self.location, 'VDIs': self.images.keys()} if self.storage_max == XEND_STORAGE_NO_MAXIMUM: stfs = os.statvfs(self.location) - retval['physical_size'] = str(stfs.f_blocks * stfs.f_frsize) + retval['physical_size'] = stfs.f_blocks * stfs.f_frsize return retval